<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 打印100 - 999之间的 为水仙花 的数字
        for (i = 100; i <= 999; i++) {
            var g = i % 10;
            var s = parseInt(i % 100 / 10);
            var b = parseInt(i / 100);
            if (g * g * g + s * s * s + b * b * b === i) {
                console.log(i + '是水仙花数字')
            }
        }
    </script>
</body>

</html>